Skip to content

Conversation

@mlmcdan1
Copy link
Contributor

Summary

This fixes #7639. In 3.8.4, isAbsolutePath stopped treating URLs like /.attachments/foo.png as absolute; as a result Decap rewrote them to assets/uploads/..., the preview switched to a blob: URL, and the Git API looked for the wrong filename. I updated the regex in path.ts so a leading slash counts as absolute again and those paths behave the same as before.

Test plan

  1. In the local dev CMS I set an image field via “Choose URL” to /.attachments/test(35).png, reloaded, and confirmed the preview now uses that root-relative path (no blob: URL and no assets/uploads/... request).
  2. npm run test -- path
    Checklist

Please add a x inside each checkbox:

A picture of a cute animal (not mandatory but encouraged)
image

@mlmcdan1 mlmcdan1 requested a review from a team as a code owner October 29, 2025 16:17
Copy link
Member

@martinjagodic martinjagodic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is ok, but the unit test should handle double slashes is failing. Please make sure that double slashes are handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Images not displayed in Preview after 3.8.4 upgrade

2 participants